package com.ce.pms.occupation.vo;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.ce.pms.base.vo.SearchVO;
import com.ce.pms.common.web.ICacheManage;
/**
 * 功能描述: 整改项目登记VO
 * <p>版权所有：中企动力
 * <p>未经本公司许可，不得以任何方式复制或使用本程序任何部分
 *
 * @author  胡煦
 * Create on:2008-12-30
 * Edit author:
 * Edit on:
 * 修改原因：

 */

public class PerfectItemRequisitionVO extends SearchVO implements ICacheManage<PerfectItemRequisitionVO>  {
	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 操作状态：add 新增 <br>
	 */
	public static final String OPRATOR_STATUS_ADD = ADD;
	/**
	 * 操作状态：edit 修改 <br>
	 */
	public static final String OPRATOR_STATUS_EDIT = EDIT;
	/**
	 * 操作状态：delete 删除 <br>
	 */
	public static final String OPRATOR_STATUS_DELETE = DELETE;
	/**
	 * 主键
	 */
	private Long keyword;
	/**
	 * 楼栋Name
	 */
	private String buildingName;
	/**
	 * 整改项目类型ID
	 */
	private Long perfectItemTypeConfigId;
	/**
	 * 整改项目类型NAME
	 */
	private String perfectItemTypeConfigName;
	/**
	 * 整改项目派工ID
	 */
	private Long perfectItemDispatchId;

	/**
	 * 验房对象ID
	 */
	private Long inspectionRequisitionId;
	/**
	 * 房间ID
	 */
	private Long houseId;
	/**
	 * 房号
	 */
	private String houseNumber;
	/**
	 * 管理房号
	 */
	private String coalitionHouseNumber;
	/**
	 * 业主名字
	 */
	private String ownerName;

	/**
	 * 入伙模式 001 以产权房办理入伙 002 以管理房办理入伙
	 */
	private String joinMode;

	/**
	 * 整改申请日期
	 */
	private Date perfectRequisitionDate;

	/**
	 * 问题描述
	 */
	private String description;

	/**
	 * 期望结果
	 */
	private String expectationResult;

	/**
	 * 是否已派工 1 ：已派工 0 ：未派工
	 */
	private String dispatchYn="0";
	/**
	 * 是否已派工Value 1 ：已派工 0 ：未派工
	 */
	private String dispatchYnName="0";

	/**
	 * 该项目是否完工 1 : 完工 0 : 未完工
	 */
	private String completeYn="0";
	/**
	 * 项目完工日期
	 */
	private Date completeDate;
	/**
	 * 验收结果 1 ：通过 0：不通过
	 */
	private String checkResult;
	/**
	 * 房号和业主Map（当以管理房号登记时使用，以房号为KEY，以业主List为value）
	 */
	private Map<String, List<String>> houseNoAndOwnersMap;

	/**
	 * 是否保存的状态标志
	 * saved 代表已保存过 unsave 代表还没有保存过
	 */
	private String hasSave;

	/**
	 * 缓存中的索引位置
	 */
	private Integer index;

	/**
	 * 操作状态：<br>
	 * add 新增 <br>
	 * edit 修改 <br>
	 * delete 删除 <br>
	 * done 已保存<br>
	 */
	private String opratorStatus;

	/**
	 * @return the completeYn
	 */
	public String getCompleteYn() {
		return completeYn;
	}

	/**
	 * @param completeYn the completeYn to set
	 */
	public void setCompleteYn(String completeYn) {
		this.completeYn = completeYn;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the dispatchYn
	 */
	public String getDispatchYn() {
		return dispatchYn;
	}

	/**
	 * @param dispatchYn the dispatchYn to set
	 */
	public void setDispatchYn(String dispatchYn) {
		this.dispatchYn = dispatchYn;
	}

	/**
	 * @return the expectationResult
	 */
	public String getExpectationResult() {
		return expectationResult;
	}

	/**
	 * @param expectationResult the expectationResult to set
	 */
	public void setExpectationResult(String expectationResult) {
		this.expectationResult = expectationResult;
	}

	/**
	 * @return the houseNumber
	 */
	public String getHouseNumber() {
		return houseNumber;
	}

	/**
	 * @param houseNumber the houseNumber to set
	 */
	public void setHouseNumber(String houseNumber) {
		this.houseNumber = houseNumber;
	}

	/**
	 * @return the inspectionRequisitionId
	 */
	public Long getInspectionRequisitionId() {
		return inspectionRequisitionId;
	}

	/**
	 * @param inspectionRequisitionId the inspectionRequisitionId to set
	 */
	public void setInspectionRequisitionId(Long inspectionRequisitionId) {
		this.inspectionRequisitionId = inspectionRequisitionId;
	}

	/**
	 * @return the joinMode
	 */
	public String getJoinMode() {
		return joinMode;
	}

	/**
	 * @param joinMode the joinMode to set
	 */
	public void setJoinMode(String joinMode) {
		this.joinMode = joinMode;
	}

	/**
	 * @return the perfectItemDispatchId
	 */
	public Long getPerfectItemDispatchId() {
		return perfectItemDispatchId;
	}

	/**
	 * @param perfectItemDispatchId the perfectItemDispatchId to set
	 */
	public void setPerfectItemDispatchId(Long perfectItemDispatchId) {
		this.perfectItemDispatchId = perfectItemDispatchId;
	}

	/**
	 * @return the perfectItemTypeConfigId
	 */
	public Long getPerfectItemTypeConfigId() {
		return perfectItemTypeConfigId;
	}

	/**
	 * @param perfectItemTypeConfigId the perfectItemTypeConfigId to set
	 */
	public void setPerfectItemTypeConfigId(Long perfectItemTypeConfigId) {
		this.perfectItemTypeConfigId = perfectItemTypeConfigId;
	}

	/**
	 * @return the perfectItemTypeConfigName
	 */
	public String getPerfectItemTypeConfigName() {
		return perfectItemTypeConfigName;
	}

	/**
	 * @param perfectItemTypeConfigName the perfectItemTypeConfigName to set
	 */
	public void setPerfectItemTypeConfigName(String perfectItemTypeConfigName) {
		this.perfectItemTypeConfigName = perfectItemTypeConfigName;
	}

	/**
	 * @return the perfectRequisitionDate
	 */
	public Date getPerfectRequisitionDate() {
		return perfectRequisitionDate;
	}

	/**
	 * @param perfectRequisitionDate the perfectRequisitionDate to set
	 */
	public void setPerfectRequisitionDate(Date perfectRequisitionDate) {
		this.perfectRequisitionDate = perfectRequisitionDate;
	}

	/**
	 * @return the buildingName
	 */
	public String getBuildingName() {
		return buildingName;
	}

	/**
	 * @param buildingName the buildingName to set
	 */
	public void setBuildingName(String buildingName) {
		this.buildingName = buildingName;
	}

	/**
	 * @return the completeDate
	 */
	public Date getCompleteDate() {
		return completeDate;
	}

	/**
	 * @param completeDate the completeDate to set
	 */
	public void setCompleteDate(Date completeDate) {
		this.completeDate = completeDate;
	}

	/**
	 * @return the dispatchYnName
	 */
	public String getDispatchYnName() {
		return dispatchYnName;
	}

	/**
	 * @param dispatchYnName the dispatchYnName to set
	 */
	public void setDispatchYnName(String dispatchYnName) {
		this.dispatchYnName = dispatchYnName;
	}

	/**
	 * @param houseNoAndOwnersMap the houseNoAndOwnersMap to set
	 */
	public void setHouseNoAndOwnersMap(Map<String, List<String>> houseNoAndOwnersMap) {
		this.houseNoAndOwnersMap = houseNoAndOwnersMap;
	}

	/**
	 * @return the houseNoAndOwnersMap
	 */
	public Map<String, List<String>> getHouseNoAndOwnersMap() {
		return houseNoAndOwnersMap;
	}

	/**
	 * @return the ownerName
	 */
	public String getOwnerName() {
		return ownerName;
	}

	/**
	 * @param ownerName the ownerName to set
	 */
	public void setOwnerName(String ownerName) {
		this.ownerName = ownerName;
	}

	/**
	 * @return the keyword
	 */
	public Long getKeyword() {
		return keyword;
	}

	/**
	 * @param keyword the keyword to set
	 */
	public void setKeyword(Long keyword) {
		this.keyword = keyword;
	}

	public String getHasSave() {
		return hasSave;
	}

	public void setHasSave(String hasSave) {
		this.hasSave = hasSave;
	}

	public Integer getIndex() {
		return index;
	}

	public void setIndex(Integer index) {
		this.index = index;
	}

	public String getOpratorStatus() {
		return opratorStatus;
	}

	public void setOpratorStatus(String opratorStatus) {
		this.opratorStatus = opratorStatus;
	}

	/**
	 * @return the checkResult
	 */
	public String getCheckResult() {
		return checkResult;
	}

	/**
	 * @param checkResult the checkResult to set
	 */
	public void setCheckResult(String checkResult) {
		this.checkResult = checkResult;
	}

	/**
	 * @return the coalitionHouseNumber
	 */
	public String getCoalitionHouseNumber() {
		return coalitionHouseNumber;
	}
	public int compareTo(PerfectItemRequisitionVO o) {
		Integer another = o.getIndex();
		Integer thisIndex = this.index;
		another = another == null ? 0 : another;
		thisIndex = thisIndex == null ? 0 : thisIndex;
		return another - thisIndex;
	}


	/**
	 * @param coalitionHouseNumber the coalitionHouseNumber to set
	 */
	public void setCoalitionHouseNumber(String coalitionHouseNumber) {
		this.coalitionHouseNumber = coalitionHouseNumber;
	}

	@Override
	public int hashCode() {
		final int PRIME = 31;
		int result = 1;
		result = PRIME * result + ((index == null) ? 0 : index.hashCode());
		result = PRIME * result + ((keyword == null) ? 0 : keyword.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final PerfectItemRequisitionVO other = (PerfectItemRequisitionVO) obj;
		if (index == null) {
			if (other.index != null)
				return false;
		} else if (!index.equals(other.index))
			return false;
		if (keyword == null) {
			if (other.keyword != null)
				return false;
		} else if (!keyword.equals(other.keyword))
			return false;
		return true;
	}

	/**
	 * @return the houseId
	 */
	public Long getHouseId() {
		return houseId;
	}

	/**
	 * @param houseId the houseId to set
	 */
	public void setHouseId(Long houseId) {
		this.houseId = houseId;
	}






}
